package org.zlb.manager.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.zlb.manager.entity.FunParam;
import org.zlb.manager.service.FunParamService;

import java.util.List;

/**
 * TODO
 *
 * @author zhoulingbo
 * @date 2021/8/10 12:45
 */
@Controller
@RequestMapping(value = "/funParam")
public class FunParamControl {

    @Autowired
    private FunParamService funParamService;

    @RequestMapping(value = "/list")
    public List<FunParam> list() {
        return funParamService.list();
    }

    @RequestMapping(value = "/item")
    public FunParam item(String paramGroup, String paramKey) {
        return funParamService.item(paramGroup, paramKey);
    }

    @RequestMapping(value = "/add")
    public void add(FunParam funParam) {
        funParamService.save(funParam);
    }

    @RequestMapping(value = "/update")
    public void update(FunParam funParam) {
        funParamService.save(funParam);
    }

    @RequestMapping(value = "/delete")
    public void delete(String paramGroup, String paramKey) {
        funParamService.delete(paramGroup, paramKey);
    }
}
